<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="/js/vue.js"></script>
    <title>Document</title>
    <style>
        #app{
            width: 600px;
            margin: 40px auto;
        }
        button{
            margin-top: 15px;
        }
    </style>
</head>
<body>
    <div id="app">
        <h2>统计信息</h2>
        <form>
            <label>
                性别:
                <my-radio name="gender" value="0">男</my-radio>
                <my-radio name="gender" value="1">女</my-radio>
            </label>
            <div>
              <button>提交</button>
    </div>
</form>
</div>
</body>
<script type="text/x-template" id="my-radio">
    <label>
        <input type="radio":name="name":value="value" >
        <slot></slot>
    </label>
</script>
<script>
    Vue.component('my-radio',{
        template:'#my-radio',
        props:['name,','value']
    })
    let vm =new Vue({
       el:"#app"
})
</script>
</body>
</html>
</html>